<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
     <%
		String path = request.getContextPath();
		String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%request.setCharacterEncoding("utf-8"); %>
<!DOCTYPE html>
<html>
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>商品查看</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <!--bootstrap.min.css-->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
    <!--font-awesome.css?v=4.4.0-->
    <link href="https://cdn.staticfile.org/font-awesome/4.4.0/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <!--bootstrap.min.css-->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
    <!--custom.css-->
	<link rel="stylesheet" type="text/css" href="<%=basePath%>css/plugins/iCheck/custom.css"/>
	<!--style.css-->
	<link rel="stylesheet" type="text/css" href="<%=basePath%>css/style.css"/>
	<!--jquery.min.js-->
	<script src="https://cdn.staticfile.org/jquery/2.1.4/jquery.min.js"></script>
</head>
<body style="background-color:#FCF8F5;background-image: url('http://localhost:80/SLmbcs/img/myimg/beijing.png'); background-repeat:no-repeat;background-position:150px 50%" >

	<div style="height:30px;" class="container-fluid">
		<div class="col-md-4" style="width:200px;height:200px;float:left;margin-top:20px">
			<img id="gimg" src="" width="200" height="200" alt="" />
		</div>
		<div class="col-md-6" style="width:550px;height:400px;float:left;margin-left:20px;margin-top:20px;border:1px solid #1AB394">  
			<div class="row">
				<span style="font-size:22px;float:left;">商品名称:</span>
				 <p id="gname"  style="font-size:18px;float:left;margin-top:4px;margin-left:5px"></p>
			</div>
             
			 
			 <div class="row">
				  <span style="font-size:22px;float:left;">商品编号:</span>
				  <p id="gid" style="font-size:18px;margin-top:4px;margin-left:5px;float:left"></p>
			 </div>
			 
			 
			 <div class="row">
				  <span style="font-size:22px;float:left;">商品类型:</span>
				  <p id="gtype" style="font-size:18px;margin-top:4px;margin-left:5px;float:left;"></p>
			 </div>
			 
			  <div class="row">
				  <span style="font-size:22px;float:left;">商品价格:</span>
				  <p id="gprice" style="font-size:18px;margin-top:4px;margin-left:5px;float:left;"></p>
			 </div>
			 
			  <div class="row">
				  <span style="font-size:22px;float:left;">商品库存:</span>
				  <p id="gcount" style="font-size:18px;margin-top:4px;margin-left:5px;float:left;"></p>
			 </div>
			 
			  <div class="row">
				  <span style="font-size:22px;float:left;">商品状态:</span>
				  <p id="gstate" style="font-size:18px;margin-top:4px;margin-left:5px;float:left;"></p>
			 </div>
			 
			  <div class="row">
				  <span style="font-size:22px;float:left;">商品描述:</span>
				  <p id="gdesc" style="font-size:18px;margin-top:4px;margin-left:5px;float:left;">&nbsp;&nbsp;&nbsp;&nbsp;
				  <!--   2017新款休闲潮个性小单肩包防水尼龙迷你腰包 蓝色
				    2017新款休闲潮个性小单肩包防水尼龙迷你腰包 蓝色
				    2017新款休闲潮个性小单肩包防水尼龙迷你腰包 蓝色
					新款防泼水大容量尼龙帆布电脑包 黑色 -->
					</p>
			 </div>
        </div>
			
		</div>
	
	

	










<!--bootstrap.min.js-->
<script src="https://cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<!--jquery.peity.min.js-->
<script src="<%=basePath%>js/plugins/peity/jquery.peity.min.js" type="text/javascript" charset="utf-8"></script>
<!--content.js-->
<script src="<%=basePath%>js/content.js" type="text/javascript" charset="utf-8"></script>
<!--icheck.min.js-->
<script src="<%=basePath%>js/plugins/iCheck/icheck.min.js" type="text/javascript" charset="utf-8"></script>
<!--peity-demo.js-->
<script src="<%=basePath%>js/demo/peity-demo.js" type="text/javascript" charset="utf-8"></script>
<!--layer.min.js-->
<script src="<%=basePath%>js/plugins/layer/layer.min.js" type="text/javascript" charset="utf-8"></script>
<!-- toastr.min.js -->
<script src="<%=basePath%>js/plugins/toastr/toastr.min.js" type="text/javascript" charset="utf-8"></script>
<!-- jquery-bootstrap-pagination.js -->
<script src="<%=basePath%>js/plugins/jquery-bootstrap-pagination/jquery-bootstrap-pagination.js" type="text/javascript" charset="utf-8"></script>
<!-- pubic.js -->
<script src="<%=basePath%>js/pubic.js" type="text/javascript" charset="utf-8"></script>

<script>
	$.get('<%=basePath%>GoodsServlet/goodsInfoById',{"goods_id":${param.goods_id}},function(data){
		var goods = JSON.parse(data);
		$('#gname').text(goods.goods_name);
		$('#gid').text(goods.goods_id);
		$('#gtype').text(goods.gtype_name);
		$('#gprice').text(goods.goods_price);
		$('#gstate').text(goods.state_name);
		$('#gcount').text(goods.goods_count);
		$('#gdesc').text(goods.goods_desc);
		console.log(goods.goods_img);
		$('img').attr('src',goods.goods_img);
	
	});
</script>
</body>
</html>